OTCloseProvider
Closes a provider of any type--endpoint, mapper, or service provider.C INTERFACE
OSStatus OTCloseProvider(ProviderRef ref);C++ INTERFACE
OSStatus TProvider::Close()PARAMETERS
ref
- The provider reference of the provider to be closed and deleted.
DESCRIPTION
TheOTCloseProvider
function closes the provider that you specify in theref
parameter. Closing the provider deletes all memory reserved for it in the system heap, deletes its resources, and cancels any provider functions that are currently executing.Open Transport does not guarantee that all outstanding functions have completed before it closes the provider. It is ultimately your responsibility to make sure that all provider functions that you care about have finished executing, before you close and delete a provider.
- WARNING
- You need to be sure that are no outstanding
T_MEMORY_RELEASED
events for a provider before you close the provider. Otherwise, Open Transport attempts to deliver the event to a provider that no longer exists, with unpredictable results, such as crashing the system.![]()
SEE ALSO
To create and open an endpoint, call theOTOpenEndpoint
function or theOTAsyncOpenEndpoint
function, both described in the chapter "Endpoints" in this book.To create and open a mapper, call the
OTOpenMapper
function or theOTAsyncOpenMapper
function, both described in the chapter "Mappers" in
this book.To create and open a AppleTalk service provider, call the
OTOpenAppleTalkServices
function or theOTAsyncOpenAppleTalkServices
function, both described in the chapter "AppleTalk Services" in this book.To create and open a TCP/IP service provider, call the
OTOpenInternetServices
function or theOTAsyncOpenInternetServices
function, both described in the chapter "TCP/IP Services" in this book.